package cn.iocoder.yudao.module.shop.dal.mysql.masterstatistics;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.shop.dal.dataobject.masterstatistics.ShopMasterStatisticsDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.shop.controller.admin.masterstatistics.vo.*;

/**
 * 艾灸师统计 Mapper
 *
 * @author 曹建伟
 */
@Mapper
public interface ShopMasterStatisticsMapper extends BaseMapperX<ShopMasterStatisticsDO> {

    default PageResult<ShopMasterStatisticsDO> selectPage(ShopMasterStatisticsPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<ShopMasterStatisticsDO>()
                .eqIfPresent(ShopMasterStatisticsDO::getUserId, reqVO.getUserId())
                .betweenIfPresent(ShopMasterStatisticsDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(ShopMasterStatisticsDO::getId));
    }

    default List<ShopMasterStatisticsDO> selectList(ShopMasterStatisticsExportReqVO reqVO) {
        return selectList(new LambdaQueryWrapperX<ShopMasterStatisticsDO>()
                .eqIfPresent(ShopMasterStatisticsDO::getUserId, reqVO.getUserId())
                .betweenIfPresent(ShopMasterStatisticsDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(ShopMasterStatisticsDO::getId));
    }

}
